import request from '@/utils/request';

// 查询常见问题列表
export function listIssue(query) {
	return request({
		url: '/mall/issue/list',
		method: 'post',
		data: query,
	});
}

// 查询常见问题详细
export function getIssue(id) {
	return request({
		url: '/mall/issue/getInfo',
		method: 'post',
		data: { id: id },
	});
}

// 新增常见问题
export function addIssue(data) {
	return request({
		url: '/mall/issue/add',
		method: 'post',
		data: data,
	});
}

// 编辑常见问题
export function updateIssue(data) {
	return request({
		url: '/mall/issue/edit',
		method: 'post',
		data: data,
	});
}

// 删除常见问题
export function delIssue(id) {
	return request({
		url: '/mall/issue/remove',
		method: 'post',
		data: { id: id },
	});
}

// 导出常见问题
export function exportIssue(query) {
	return request({
		url: '/mall/issue/export',
		method: 'post',
		params: query,
	});
}
